Proposal by Viktor Kerkez for Supporting the Coral a scripting syntax for Smalltalk

Proposed by Viktor Kerkez (profile, biography) Don't forget to submit this proposal to official Google Melange site too!


How will I do that project

My current opinion is that the smalltalk language is a great language for scripting. It's syntax is very sparse and readable, message passing is very powerful, etc.. All it's missing is better library support for this kind of job (and maybe some shorter names :)).

So the idea is to make as little changes to the syntax as possible. I think GNUSmalltalk is already doing a pretty good job at this area (besides Coral), so there is a lesson that can be learned from it.

Also an interactive interpreter, with tab completion, introspection, etc... Is very useful when developing a script. It's much easier to have an interpreter open alongside with your editor, so you can test things without the need to execute the whole script.

Because nobody wants to reinvent the wheel I'll take a look at the libraries from a language I'm already very familiar with, and is great for scripting, especially system administration, etc.. The Python language. Python have a few great libraries for this kind of job.

  • os — Miscellaneous operating system interfaces
  • shutil — Utility functions for copying files and directory trees.
  • subprocessSubprocesses with accessible I/O streams
  • glob — Unix style pathname pattern expansion
  • optparse — Powerful command line option parser
  • logging — Logging facility for Python
  • ...

These are just some of them. So bluntly stealing good code is, I think, in this case a very good option :)

First I'll have to consult with the project mentors what are the priorities for this project, what are the ideas they have, and how they want them to be implemented. They are much more competent and probably already have the idea what they want to do with the syntax changes. After that I can start working on the libraries that are most interesting to the smalltalk community.

Where I see the risks

I used python for a great deal of system administration scripting problems and it turned out that even subprocess isn't good enough for some things on windows, i.e. windows is sometimes behaving very strangely. So I implemented it from the ground up in python: http://bitbucket.org/teacupapps/tea/src/tip/src/tea/process/ also there were problems with file locking on windows so I reimplemented the file object for the logging library: http://bitbucket.org/teacupapps/tea/src/1f5275919c45/src/tea/logger/win_file.py, etc... I suppose there gonna be similar problems here. Making something cross platform can be really, really difficult... But since I'm already dealing with problems like this, I know they can be solved...

Suggested timeline and milestones

Weeks 1-2

  • Getting familiar with all the Coral code.

  • Defining all the feature set that needs to be implemented to the Coral syntax.

  • Defining the missing libraries that needs to be implemented.

  • Defining the changes that would be needed to development tools such as debugger, system browser, etc...

Week 3-5

  • Implementing the Coral syntax.
  • Creating an interactive interpreter.

Weeks 5-10

  • Implementation of the most important missing libraries.

Weeks 11-12

  • Implementation of the changes in development tools.

How the results will look like

I hope I could make smalltalk with coral behave very similar to IPython (http://ipython.scipy.org/). An interactive shell with tab completion, easy file access, good support for system administration, etc.




Updated: 9.4.2010